<template>
  <div class="block">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="page"
      :page-sizes="[10, 20, 30, 40]"
      :page-size="pageSize"
      layout="->,sizes, prev, pager, next,total"
      :total="total"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  props: ["page", "pageSize", "total"],
  methods: {
    handleSizeChange(val) {
      // console.log(`每页 ${val} 条`);
      this.$emit('pageSizechange',val)
    },
    handleCurrentChange(val) {
      // console.log(`当前页: ${val}`);
      this.$emit('pageChange',val)
    },
  },
  data() {
    return {
      // currentPage2: 5,
      // currentPage4: 4,
    };
  },
};
</script>

<style>
</style>